import 'dart:math';

main() {
  var ca = new calculation();
  ca.division(0, 1);
}

class calculation {
  exponentiation(double a, double x) {
    pow(a,x );
    
  }
  division(double x, double y) {
    try {
      var result;
      if (x == 0 && y == 0) {
        print(result = 0);
      } else {
        print(result = x / y);
      }
    } on IntegerDivisionByZeroException {
      print('无法除以零');
    }
  }
}
